package com.thinkingstar.iads;

import org.beetl.core.GroupTemplate;
import org.nutz.boot.NbApp;
import org.nutz.dao.Dao;
import org.nutz.dao.util.Daos;
import org.nutz.integration.shiro.ShiroSessionProvider;
import org.nutz.ioc.impl.PropertiesProxy;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.SessionBy;


/**
 * @author chi
 * 启动主类
 */
@IocBean(create="init")
//shiro session
@SessionBy(ShiroSessionProvider.class)
public class MainLauncher {

	@Inject 
	Dao dao;
	
	@Inject
	protected PropertiesProxy conf; //获取application.properties


	public void init() {
		Daos.createTablesInPackage(dao, "com.thinkingstar.iads", false);
	}

	public static void main(String[] args) throws Exception {
		new NbApp().setArgs(args).setPrintProcDoc(true).run();
	}

}
